/**
 * This class initiates the corresponding replica.
 */
package com.comp6231.replica2;

import com.comp6231.common.EntityInitiator;

/**
 * @author Farzana Alam
 * 
 */
public class Replica2Initiator extends EntityInitiator {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		replicaObjects.put(replica2_name, new CoordinatorReplica2(
				replica2_hostName, replica2_UDPPort_data,
				replica2_UDPPort_control, replica2_name, replica2_ID,
				replicaList, frontEndList));
		try {
			synchronized (Thread.currentThread()) {
				Thread.currentThread().wait(10000);
			}
		} catch (InterruptedException e) {
			e.printStackTrace();
		}

		// waiting 10 seconds for the others replicas to get initiated before
		// running the respective failure detection subsystem
		replicaObjects.get(replica2_name).startFailureDetector();
	}

}
